package com.sgcc.system.api;

import com.sgcc.common.core.constant.ServiceNameConstants;
import com.sgcc.common.core.domain.R;
import com.sgcc.common.core.web.domain.AjaxResult;
import com.sgcc.common.core.web.page.TableDataInfo;
import com.sgcc.system.api.domain.SysDictData;
import com.sgcc.system.api.domain.SysUser;
import com.sgcc.system.api.factory.RemoteDictDataFallbackFactory;
import com.sgcc.system.api.factory.RemoteFileFallbackFactory;
import com.sgcc.system.api.factory.RemoteUserFallbackFactory;
import com.sgcc.system.api.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 字典
 * 
 * @author sgcc
 */
@FeignClient(contextId = "remoteDictDataService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteDictDataFallbackFactory.class)
public interface RemoteDictDataService
{
    /**
     * 根据字典类型标签生成当天顺序ID
     */
    @GetMapping(value = "/dict/data/type/{dictType}/{label}")
    public R getIdStr(@PathVariable(value="dictType") String dictType, @PathVariable(value="label") String label);

    @GetMapping(value = "/dict/data/type/{dictType}")
    public R<List<SysDictData>> selectDictDataByType(@PathVariable(value="dictType") String dictType);

    @PostMapping(value = "/dict/data/dictType")
    public AjaxResult dictType(@RequestParam("dictType") String dictType);



    @GetMapping(value = "/dict/data/label/{dictType}/{vaule}")
    public String getLabel(@PathVariable(value="dictType") String dictType, @PathVariable(value="vaule") String vaule);
}
